package com.ucomm.talent.widget;

import android.content.Context;
import com.ucomm.talent.R;
import com.ucomm.talent.adapter.SingleChoicAdapter;
import com.ucomm.talent.common.UIHelper;

import java.util.List;

public class SingleChoiceDialog extends AbstractChoickDialog{

    private SingleChoicAdapter<String> mSingleChoicAdapter;

    public SingleChoiceDialog(Context context, List<String> list) {
        super(context, list);

        initData();
    }

    protected void initData() {
        // TODO Auto-generated method stub
        mSingleChoicAdapter = new SingleChoicAdapter<String>(mContext, mList, R.drawable.radiobutton_style);

        mListView.setAdapter(mSingleChoicAdapter);
        mListView.setOnItemClickListener(mSingleChoicAdapter);

        UIHelper.setListViewHeightBasedOnChildren(mListView);

    }


    public int getSelectItem()
    {
        return mSingleChoicAdapter.getSelectItem();
    }



}

